<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/include/page.jsp"%>
<style>
	.pageFormContent label
	{
		float: none;
	}
</style>
<h2 class="contentTitle">
	<c:choose>
		<c:when test="${param.operType == 'update' }">
			管理员更新
		</c:when>
		<c:when test="${param.operType == 'updatePass' }">
			管理员修改密码
		</c:when>
		<c:when test="${param.operType == 'resetPass' }">
			管理员重置密码
		</c:when>
	</c:choose>
</h2>
<div class="pageContent">
	<form method="post" action="${rootpath }/back/admins/adminsUpdateSubmit.html"
		class="pageForm required-validate"
		onsubmit="return validateCallback(this)">
		
		<input type="hidden" name="aid" value="${requestScope.admins.id }">
		<input type="hidden" name="operType" value="${param.operType }">
		
		<div class="pageFormContent nowrap" layoutH="97">
			<c:choose>
				<c:when test="${param.operType == 'update' }">
					<dl>
						<dt>邮箱：</dt>
						<dd>
							<input type="text" name="email" class="required email" size="50"
								placeholder="请输入您的电子邮件" value="${requestScope.admins.email }"/>
							<span class="info"></span>
						</dd>
					</dl>
					<dl>
						<dt>姓名：</dt>
						<dd>
							<input type="text" name="trueName" placeholder="请输入您的姓名" class="required" size="50"
							 value="${requestScope.admins.trueName }"/>
							<span class="info"></span>
						</dd>
					</dl>
					<dl>
						<dt>手机：</dt>
						<dd>
							<input type="text" name="phone" class="required phone" placeholder="请输入您的手机号码"  size="50"
							value="${requestScope.admins.phone }"/>
							<span class="info"></span>
						</dd>
					</dl>
					<dl>
						<dt>qq：</dt>
						<dd>
							<input type="text" name="qq" placeholder="请输入您的qq" class="required" size="50"
							value="${requestScope.admins.qq }"/>
							<span class="info"></span>
						</dd>
					</dl>
					<dl>
						<dt>状态：</dt>
						<dd>
							<input type="radio" id="statusAdminsUpdate1" name="status" value="1" ${requestScope.admins.status == '1' ? 'checked' : '' }>
							<label for="statusAdminsUpdate1">启用</label>
							<input type="radio" id="statusAdminsUpdate0" name="status" value="0" ${requestScope.admins.status == '0' ? 'checked' : '' }>
							<label for="statusAdminsUpdate0">禁用</label>
							<span class="info"></span>
						</dd>
					</dl>
				</c:when>
				<c:when test="${param.operType == 'updatePass' }">
					<dl>
						<dt>邮箱：</dt>
						<dd>
							${requestScope.admins.email }
						</dd>
					</dl>
					<dl>
						<dt>原密码：</dt>
						<dd>
							<input type="password" name="souPass" size="50"
								class="required alphanumeric" minlength="6" maxlength="20"
								placeholder="字母、数字、下划线 6-20位" />
							<span class="info"></span>
						</dd>
					</dl>
					<dl>
						<dt>密码：</dt>
						<dd>
							<input id="password" type="password" name="password" size="50"
								class="required alphanumeric" minlength="6" maxlength="20"
								placeholder="字母、数字、下划线 6-20位" />
							<span class="info"></span>
						</dd>
					</dl>
					<dl>
						<dt>确认密码：</dt>
						<dd>
							<input type="password" name="repassword" class="required" size="50"
								equalto="#password" placeholder="字母、数字、下划线 6-20位"/>
							<span class="info"></span>
						</dd>
					</dl>
				</c:when>
				<c:when test="${param.operType == 'resetPass' }">
					<dl>
						<dt>邮箱：</dt>
						<dd>
							${requestScope.admins.email }
						</dd>
					</dl>
					<dl>
						<dt>密码：</dt>
						<dd>
							<input id="password" type="password" name="password" size="50"
								class="required alphanumeric" minlength="6" maxlength="20"
								placeholder="字母、数字、下划线 6-20位" />
							<span class="info"></span>
						</dd>
					</dl>
					<dl>
						<dt>确认密码：</dt>
						<dd>
							<input type="password" name="repassword" class="required" size="50"
								equalto="#password" placeholder="字母、数字、下划线 6-20位"/>
							<span class="info"></span>
						</dd>
					</dl>
				</c:when>
			</c:choose>
			<div class="divider"></div>
		</div>
		<div class="formBar">
			<ul>
				<li>
					<div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">提交</button>
						</div>
					</div>
				</li>
				<li>
					<div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div>
				</li>
			</ul>
		</div>
	</form>
</div>